package com.gscitysfy.cus.drain.modules.template.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author shenglin
 * @since 2022-11-16 14:09:26
 */
@Getter
@Setter
@TableName("drain_template_info")
public class DrainTemplateInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId
    private Long cmKid;

    /**
     * 模板种类,险情模板和调度指令模板
     */
    private String templateKind;

    /**
     * 模板类型
     */
    private String templateType;

    /**
     * 调度模板类型
     */
    @TableField(exist = false)
    private String templateDispatchType;

    /**
     * 模板名称
     */
    private String templateName;

    /**
     * 模板启用状态
     */
    private String templateStatus;

    /**
     * 模板内容
     */
    private String templateDesc;

    private String cmCreator;

    private String cmModifier;

    private String cmOrgflag;

    private Long cmRegflag;

    private String cmTenantid;

    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date cmAddtime;

    @TableField(fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date cmUptime;

    private Long cmVersion;

    private Boolean cmUsable;

    public String getTemplateDispatchType() {
        return templateType;
    }

}
